package pk.campustour;

import android.app.TabActivity;
import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabWidget;
import android.widget.TextView;
import android.widget.TabHost.TabSpec;
 
public class MainActivity1 extends TabActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_activity1);
 
        TabHost tabHost = (TabHost) findViewById(android.R.id.tabhost);
 
       TabWidget tabWidget = (TabWidget)findViewById(android.R.id.tabs);
       
        
        
        // Tab for Home
        TabSpec photospec = tabHost.newTabSpec("Home");
        
        
        
        // setting Title and Icon for the Tab
        photospec.setIndicator("Home", getResources().getDrawable(R.drawable.icon_photos_tab));
        Intent photosIntent = new Intent(this, HomeActivity.class);
        photospec.setContent(photosIntent);
 
        // Tab for Categories
        TabSpec songspec = tabHost.newTabSpec("Categories");
        songspec.setIndicator("Categories", getResources().getDrawable(R.drawable.icon_songs_tab));
        Intent songsIntent = new Intent(this, CategoryActivity.class);
        songspec.setContent(songsIntent);
 
        // Tab for Places
        TabSpec videospec = tabHost.newTabSpec("Places");
        videospec.setIndicator("Places", getResources().getDrawable(R.drawable.icon_videos_tab));
        Intent videosIntent = new Intent(this, PlacesActivity.class);
        videospec.setContent(videosIntent);
        
        /*Changing font and color
        final TextView tv1 = (TextView) tabWidget.getChildAt(0).findViewById(android.R.id.title);        
        tv1.setTextColor(this.getResources().getColorStateList(R.color.text_tab_selected));
        
        
        final TextView tv2 = (TextView) tabWidget.getChildAt(1).findViewById(android.R.id.title);        
        tv2.setTextColor(this.getResources().getColorStateList(R.color.text_tab_selected));
        
        
        final TextView tv3 = (TextView) tabWidget.getChildAt(2).findViewById(android.R.id.title);        
        tv3.setTextColor(this.getResources().getColorStateList(R.color.text_tab_selected));*/
        
     
        
        // Adding all TabSpec to TabHost
        tabHost.addTab(photospec); // Adding photos tab
        tabHost.addTab(songspec); // Adding songs tab
        tabHost.addTab(videospec); // Adding videos tab
    }
}